﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.Practices.Unity;

namespace WmsService.BusinessLogic
{
    /// <summary>
    /// 抽象工厂实现
    /// </summary>
    public class AbstractFactory :BaseAbstractFactory
    {
        public override IInStoreBillLogic CreateInStoreBillLogic()
        {
            return CreateUnityContainer().Resolve<IInStoreBillLogic>();
        }

        public override IOutStoreBillLogic CreateOutStoreBillLogic()
        {
            return CreateUnityContainer().Resolve<IOutStoreBillLogic>();
        }

        public override IInvoiceAndPayApplyBillLogic CreateInvoiceAndPayApplyBillLogic()
        {
            return CreateUnityContainer().Resolve<IInvoiceAndPayApplyBillLogic>();
        }

        public override  IUnityContainer CreateUnityContainer()
        {
            return AOP.Global.GetIUnityContainer();
        }

        public override IStockTackingLogic CreateStockTackingLogic()
        {
            return CreateUnityContainer().Resolve<IStockTackingLogic>();
        }
    }
}